<?php
	session_start();
	
	
	$a = array('productA' => $_POST['aantalA'], 'Aprijs' => 2);
	$b = array('productB' => $_POST['aantalB'], 'Bprijs' => 5);
	$c = array('productC' => $_POST['aantalC'], 'Cprijs' => 6);
	$d = array('productD' => $_POST['aantalD'], 'Dprijs' => 7);
	$e = array('productE' => $_POST['aantalE'], 'Eprijs' => 4);
	
	$_SESSION['bestelling'] = array($a, $b, $c, $d, $e);

	foreach($_SESSION['bestelling'] as $product){
		foreach($product as $k => $v){
			if(!(empty($v[0]))){
				$overzicht .= '<tr><td>'.$v[0].'x '.key($product).' &aacute; '.$v[1].' euro : '.$v[1] * $v[0].' euro</td></tr>';
			}
			$totaal = $totaal + ($v[1] * $v[0]);
		}
	}
	$overzicht .= '<tr><td>Totaal: '.$totaal.' euro</td></tr>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Eindtoets</title>
<link href="../data/css/main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
table{
	font-size:12px;
}

td{
	padding:5px;
}
</style>
</head>

<body>
<div id="main_bg"><img src="../data/images/main_bg.jpg" alt="main bg" /></div>

<div id="wrapper">
	<!-- header -->
    	<div id="header">
        	<div id="left_bow"></div>
            	<div class="placer">
                	<div id="logo"><img src="../data/images/logo.png" alt="logo" /></div>
                </div>
            <div id="right_bow"></div>
        </div>
        
       <?php include 'menu.php'; ?>
        
        <!-- content -->
    <div id="content">
        <div class="placer">
        	<!-- col left -->
        	<div id="col_left">
                <div class="field">
                    <div class="bg_top"></div>
                    <div class="bg_mid">
                        <h2>Opdracht 3</h2>
                        <p><b>Bevestiging uw bestelling</b><br />
							De volgende producten en aantallen zijn besteld:
                        </p>
                        <table border="1" cellpadding="10px" cellspacing="2">
                       	<?= $overzicht; ?>
                        </table>
                    </div>
                    <div class="bg_bottom"></div>
              </div>
          </div>
          <!-- end col left -->
          
          <!-- col right -->
        	<div id="col_right">
                <div class="field">
                    <div class="bg_top"></div>
                    <div class="bg_mid">         
                        <h2 class="sec">Mijn projecten</h2>
                        <ul>
                        	<li><a href="http://tim-design.nl" target="_blank">HoeWasMijnVakantie.nl</a></li>
                            <li><a href="http://manitavoetverzorging.nl" target="_blank">Manitavoetverzorging.nl</a></li>
                            <li><a href="http://min40celsius.nl" target="_blank">Min40celsius.nl</a></li>
                            <li><a href="http://heurnsmannenkoor.nl" target="_blank">Heurnsmannenkoor.nl</a></li>
                            <li><a href="http://mytraintravels.com" target="_blank">Mytraintravels.com (in ontwikkeling)</a></li>
                            <li><a href="http://sitevisie.nl" target="_blank">Sitevisie.nl (in ontwikkeling)</a></li>
                        </ul>
                    </div>
                    <div class="bg_bottom"></div>
              </div>
          </div>
          <!-- end col right -->
        </div>
    </div>
    <!-- end content -->
</div>
</body>
</html>